<?php 

$file = "E:\\workspace\\FGO\\5.2.1000.log";

$cmd = "adb shell uiautomator runtest /data/local/tmp/FGO.jar -c Main#testDemo";
$result = shell_exec($cmd);

file_put_contents($file, $result);



die;
$file = fopen($file, "r");

$newResult = "";
do{
	$line = fgets($file);
	if($line === false){
		break;
	}
	$line = trim($line);
	$line = urldecode($line);
	
	$newResult .= $line . "\r\n";
}while(true);

file_put_contents("E:\\workspace\\FGO\\5.2.1000.log.done", $newResult);